import request from '@/utils/request'

// 查询巡查记录列表
export function listRecord(query) {
  return request({
    url: '/anyan/record/list',
    method: 'get',
    params: query
  })
}

// 查询巡查记录详细
export function getRecord(inspectionRecordId) {
  return request({
    url: '/anyan/record/' + inspectionRecordId,
    method: 'get'
  })
}

// 新增巡查记录
export function addRecord(data) {
  return request({
    url: '/anyan/record',
    method: 'post',
    data: data
  })
}

// 新增巡查记录
export function addRecord2(data) {
  return request({
    url: '/anyan/record/add',
    method: 'post',
    data: data
  })
}

// 修改巡查记录
export function updateRecord(data) {
  return request({
    url: '/anyan/record',
    method: 'put',
    data: data
  })
}

// 删除巡查记录
export function delRecord(inspectionRecordId) {
  return request({
    url: '/anyan/record/' + inspectionRecordId,
    method: 'delete'
  })
}

// 推送巡查记录
export function getRecord2(inspectionRecordId) {
  return request({
    url: '/anyan/record/addxin/' + inspectionRecordId,
    method: 'get'
  })
}